import request from '@/utils/request'

export function fetchList{{.TypeName}}(query) {
  return request({
    url: '/{{.FileName}}',
    method: 'GET',
    params: query
  })
}


export function get{{.TypeName}}(id){
	return request({
		url: `/{{.FileName}}/${id}`,
		method: 'GET'
	})
}

export function save{{.TypeName}}(data){
	return request({
		url: '/{{.FileName}}',
		method: 'POST',
		data
	})
}

export function delete{{.TypeName}}(id){
	return request({
		url:`/{{.FileName}}/${id}`,
		method: 'DELETE'
	})
}

export function update{{.TypeName}}(data){
	return request({
		url: `/{{.FileName}}/${data.Id}`,
		method: 'PUT',
		data
	})
}
